package cn.ld.module.system.convert.tenant;

import cn.ld.module.system.controller.admin.tenant.vo.tenant.TenantSaveInVO;
import cn.ld.module.system.controller.admin.user.vo.user.UserSaveInVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 租户 Convert
 *
 * @author 蓝盾
 */
@Mapper
public interface TenantConvert {

    TenantConvert INSTANCE = Mappers.getMapper(TenantConvert.class);

    default UserSaveInVO convert02(TenantSaveInVO bean) {
        UserSaveInVO inVO = new UserSaveInVO();
        inVO.setUsername(bean.getUsername());
        inVO.setPassword(bean.getPassword());
        inVO.setNickname(bean.getContactName()).setMobile(bean.getContactMobile());
        return inVO;
    }

}
